OBJECTS		= peer.o
PACKAGES	= glib-2.0 gnet-2.0

TARGET		= bundlepeer
LIBS		= $(shell pkg-config --libs $(PACKAGES))
CFLAGS		= -pipe -ggdb3 -Wall -I. $(shell pkg-config --cflags $(PACKAGES))

all: $(OBJECTS)
	$(CC) -o $(TARGET) $(OBJECTS) $(LIBS)
	rm -f $(OBJECTS)

clean:
	rm -f $(TARGET)

install:
	[ ! -z "$(INSTALL)" ] && ( echo "Install variable must be set!" && false ) || true

rebuild: clean all

%.o: %.c
	$(CC) -c $(CFLAGS) $*.c -o $*.o

